package com.ruoyi.consume.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consume.mapper.RegulatorConsumeTemporaryMapper;
import com.ruoyi.consume.domain.RegulatorConsumeTemporary;
import com.ruoyi.consume.service.IRegulatorConsumeTemporaryService;

/**
 * 查看临时领用信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-27
 */
@Service
public class RegulatorConsumeTemporaryServiceImpl implements IRegulatorConsumeTemporaryService
{
    @Autowired
    private RegulatorConsumeTemporaryMapper regulatorConsumeTemporaryMapper;

    /**
     * 查询查看临时领用信息
     *
     * @param regulatorConsumeTemporaryId 查看临时领用信息ID
     * @return 查看临时领用信息
     */
    @Override
    public RegulatorConsumeTemporary selectRegulatorConsumeTemporaryById(Long regulatorConsumeTemporaryId)
    {
        return regulatorConsumeTemporaryMapper.selectRegulatorConsumeTemporaryById(regulatorConsumeTemporaryId);
    }

    /**
     * 查询查看临时领用信息列表
     *
     * @param regulatorConsumeTemporary 查看临时领用信息
     * @return 查看临时领用信息
     */
    @Override
    public List<RegulatorConsumeTemporary> selectRegulatorConsumeTemporaryList(RegulatorConsumeTemporary regulatorConsumeTemporary)
    {
        return regulatorConsumeTemporaryMapper.selectRegulatorConsumeTemporaryList(regulatorConsumeTemporary);
    }

    /**
     * 新增查看临时领用信息
     *
     * @param regulatorConsumeTemporary 查看临时领用信息
     * @return 结果
     */
    @Override
    public int insertRegulatorConsumeTemporary(RegulatorConsumeTemporary regulatorConsumeTemporary)
    {
        regulatorConsumeTemporary.setCreateTime(DateUtils.getNowDate());
        return regulatorConsumeTemporaryMapper.insertRegulatorConsumeTemporary(regulatorConsumeTemporary);
    }

    /**
     * 修改查看临时领用信息
     *
     * @param regulatorConsumeTemporary 查看临时领用信息
     * @return 结果
     */
    @Override
    public int updateRegulatorConsumeTemporary(RegulatorConsumeTemporary regulatorConsumeTemporary)
    {
        regulatorConsumeTemporary.setUpdateTime(DateUtils.getNowDate());
        return regulatorConsumeTemporaryMapper.updateRegulatorConsumeTemporary(regulatorConsumeTemporary);
    }

    /**
     * 批量删除查看临时领用信息
     *
     * @param regulatorConsumeTemporaryIds 需要删除的查看临时领用信息ID
     * @return 结果
     */
    @Override
    public int deleteRegulatorConsumeTemporaryByIds(Long[] regulatorConsumeTemporaryIds)
    {
        return regulatorConsumeTemporaryMapper.deleteRegulatorConsumeTemporaryByIds(regulatorConsumeTemporaryIds);
    }

    /**
     * 删除查看临时领用信息信息
     *
     * @param regulatorConsumeTemporaryId 查看临时领用信息ID
     * @return 结果
     */
    @Override
    public int deleteRegulatorConsumeTemporaryById(Long regulatorConsumeTemporaryId)
    {
        return regulatorConsumeTemporaryMapper.deleteRegulatorConsumeTemporaryById(regulatorConsumeTemporaryId);
    }

    /**
     * 获取用户下拉框
     *
     * @param
     * @return 结果
     */
    @Override
    public List<RegulatorConsumeTemporary> getUserName(){
        return regulatorConsumeTemporaryMapper.getUserName();
    }
}
